package B2;

import com.github.oxo42.stateless4j.delegates.Action;

public class Locking implements Action{
    ControlPanel Cnow=null;
    Locking(ControlPanel c){
        Cnow=c;
    }
    @Override
    public void doIt() {
        System.out.println("密码错误");
        System.out.println("错误次数已达到 3 次开始锁定系统，锁定时间120秒");
        try {
            Thread.sleep(120*1000);
        }catch (InternalError | InterruptedException e){
            e.printStackTrace();
        }
        Cnow.setLock();
    }
}

